|
XROTATE OBJECT
This command will rotate the specified 3D object around the X axis dimension.
XROTATE OBJECT Object Number, XAngle
Object Number
Integer
The object number
XAngle
Float
The x angle to set the object too
This command does not return a value.
The object number should be specified using an integer value. The rotation angle should be specified using a real number.
sync on : sync rate 0 : hide mouse:cls 0
ObjectNumber=1
SecondObject=2
load object "model.x",ObjectNumber
load object "model.x",SecondObject
rotate object ObjectNumber, 270, 0, 0
fix object pivot ObjectNumber
point object ObjectNumber,0,0,0
position object ObjectNumber, 0,0,0
while mouseclick()=0
if inkey$()="r" then rotate object ObjectNumber, 0,wrapvalue(object angle y(1)+1),0
if inkey$()="x" then xrotate object ObjectNumber,wrapvalue(object angle x(1)+1)
if inkey$()="y" then yrotate object ObjectNumber,wrapvalue(object angle y(1)+1)
if inkey$()="z" then zrotate object ObjectNumber,wrapvalue(object angle z(1)+1)
sync
endwhile
delete object ObjectNumber
delete object SecondObject
end
BASIC3D Commands Menu
Index
|